package com.firebird.app.fekpsl.api

import com.firebird.app.fekpsl.bean.BaseListResponseBody
import com.firebird.app.fekpsl.bean.BlankFillingQuestion
import com.firebird.app.fekpsl.bean.HttpResult
import com.firebird.app.fekpsl.bean.MultipleAnswer
import com.firebird.app.fekpsl.bean.Paper
import com.firebird.app.fekpsl.bean.SingleAnswer
import com.firebird.app.fekpsl.bean.TrueFalseQuestion
import io.reactivex.Observable
import retrofit2.http.*

/**
 * Created by firebird on 2018/4/21.
 */
interface ExamApiService {
    /*** exam  **/
    @GET("/exam/paper/list/{page_no}/json")
    fun getAllPaperList(@Path("page_no") page_no: Int): Observable<HttpResult<BaseListResponseBody<Paper>>>

    @GET("/exam/paper/list/{page_no}/{category}/json")
    fun getPaperListByCategory(@Path("page_no") page_no: Int,
                               @Path("category") category: String): Observable<HttpResult<BaseListResponseBody<Paper>>>

    @GET("/exam/paper/single_answer/list/{subject_id}/json")
    fun getSingleAnswerList(@Path("subject_id") single_id: Int): Observable<HttpResult<List<SingleAnswer>>>

    @GET("/exam/paper/single_answer/{id}/json")
    fun getSingleAnswer(@Path("id") id: Int): Observable<HttpResult<SingleAnswer>>

    @GET("/exam/paper/multiple_answer/list/{subject_id}/json")
    fun getMultipleAnswerList(@Path("subject_id") single_id: Int): Observable<HttpResult<List<MultipleAnswer>>>

    @GET("/exam/paper/multiple_answer/{id}/json")
    fun getMultipleAnswer(@Path("id") id: Int): Observable<HttpResult<MultipleAnswer>>

    @GET("/exam/paper/true_false_question/list/{subject_id}/json")
    fun getTrueFalseQuestionList(@Path("subject_id") single_id: Int): Observable<HttpResult<List<TrueFalseQuestion>>>

    @GET("/exam/paper/true_false_question/{id}/json")
    fun getTrueFalseQuestion(@Path("id") id: Int): Observable<HttpResult<TrueFalseQuestion>>

    @GET("/exam/paper/blank_filling_question/list/{subject_id}/json")
    fun getBlankFillingQuestionList(@Path("subject_id") single_id: Int): Observable<HttpResult<List<BlankFillingQuestion>>>

    @GET("/exam/paper/blank_filling_question/{id}/json")
    fun getBlankFillingQuestion(@Path("id") id: Int): Observable<HttpResult<BlankFillingQuestion>>
}